
      <?php if(isset($this->post)) {?>
        <form method="POST" action="index.php?controller=Post&action=UpdatePost" class="well" id="WritePostFrm">
          <input type="hidden" name="postid" value="<?php echo $this->post->get_id(); ?>">
          <label for="postHeader">Заголовок</label>
          <input type="text" name="postHeader" placeholder="Название" id="postHeader" class="large" value="<?php echo $this->post->get_header(); ?>">
          <label for="postBody">Запись</label>
          <textarea name="postBody" id="postBody" cols="50" rows="20">
            <?php echo $this->post->get_body(); ?>
          </textarea>
          <div class="btn-group">
            <input type="submit" class="btn btn-primary" value="Сохранить">
            <button name="XSSDANGER" class="btn btn-danger">XSS</button>
            <button type="reset" class="btn">
              <i class="icon icon-trash"></i>
            </button>
          </div>
        </form>
      <?php }else{ ?>
        <form method="POST" action="index.php?controller=Post&action=CreatePost" class="well" id="WritePostFrm">
          <label for="postHeader">Заголовок</label>
          <input type="text" name="postHeader" placeholder="Название" id="postHeader" class="large">
          <label for="postBody">Запись</label>
          <textarea name="postBody" id="postBody" cols="50" rows="20"></textarea>
          <label for="tags">Тэги</label>
          <input type="text" name="tags" id="tags" placeholder="указывайте через запятую"/>
          <div class="btn-group">
            <input type="submit" class="btn btn-primary" value="Написать">
            <button type="reset" class="btn">
              <i class="icon icon-trash"></i>
            </button>
          </div>
        </form>
      <?php } ?>
